import 'package:event_bus/event_bus.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';

import '../app.dart';
import '../public.dart';

/// 初始化mixin
mixin InitMixin on State<MyApp> {
  @override
  void initState() {
    super.initState();

    ACGN.event = EventBus();
    ACGN.navGK = GlobalKey<NavigatorState>();
    ACGN.http = httpManager;
    ACGN.toast = acgnToast;

    final router = FluroRouter();
    Routers.configureRoutes(router);
    ACGN.router = router;
    ACGN.accessToken = null;
  }
}
